/*
 * @Author: 肖燕 2461435122@qq.com
 * @Date: 2022-11-07 18:54:54
 * @LastEditors: 肖燕 2461435122@qq.com
 * @LastEditTime: 2024-12-17 16:51:32
 * @FilePath: /mrismodulecash/src/assets/scripts/tools/use-attachment.js
 * @Description: 查看附件
 */

import { reactive } from '@vue/composition-api'
import { PopView } from './use-tools'

export default function (props, context, query = {}) {
  class PopAttachment extends PopView {
    /**
     * @description: 设置src地址
     * @param {*} list
     * @return {*}
     */
    setSrcList (list) {
      let arr = []
      if (list) {
        arr = list.split(',').map(item => `${window.apiUrl.python}${item}`)
      }
      return arr
    }
  }
  // 查看附件
  const attachmentObj = reactive(new PopAttachment(''))

  return {
    attachmentObj
  }
}
